package com.hx.vending.service;

import com.hx.vending.bean.Role;
import com.hx.vending.util.Msg;

import java.util.List;

/**
 * Created by Administrator on 2019/1/2.
 */
public interface IRoleService {
    /**
     * 查询菜单列表
     * @param role
     * @return
     */
    List<Role> selectRoles(Role role);

    /**
     * 添加菜单
     * @param role
     * @return
     */
    int insertRole(Role role);
    /**
     * 修改角色
     * @param role
     * @return
     */
    int updateByPrimaryKey(Role role);

    /**
     * 设置某个角色的权限
     * @param roleId 角色id
     * @param menuIds 权限id
     */
    Msg setAuthority(Integer roleId, String menuIds);

    /**
     * 删除角色
     * @param roleIds
     */
    Msg delRoleById(String roleIds);

    Role selectByPrimary(Role role);

    String[] selectMenuByRole(Integer roleId);

}
